00ad1c
@@ -270,6 +270,8 @@
public class MiniZooKeeperCluster {
       throw new IOException("Waiting for shutdown of standalone server");
     }
 
+    zooKeeperServers.get(activeZKServerIndex).getZKDatabase().close();
+
     // remove the current active zk server
     standaloneServerFactoryList.remove(activeZKServerIndex);
     clientPortList.remove(activeZKServerIndex);
@@ -311,6 +313,8 @@
public class MiniZooKeeperCluster {
       throw new IOException("Waiting for shutdown of standalone server");
     }
 
+    zooKeeperServers.get(backupZKServerIndex).getZKDatabase().close();
+
     // remove this backup zk server
     standaloneServerFactoryList.remove(backupZKServerIndex);
     clientPortList.remove(backupZKServerIndex);
